<!DOCTYPE html>
<!--引入 Thymeleaf 命名空间-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<script th:inline="javascript">
    let msg = [[${session.msg}]];
    alert(msg);
</script>
<!--th:text用于处理p标签体的文本内容-->
我是首页<p th:text="${session.loginUser.name}"></p>
<div th:text="${session.loginUser.username}"></div>
<p th:text="${session.loginUser.avatar}"></p>
<!--th:src="@{${'/img' + session.loginUser.avatar}}" -->
<img th:src="@{${'/avatar?name=' + session.loginUser.avatar}}" />
</body>
</html>